<%@page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>预算审核</title>
<%@ include file="../../common/common.jsp"%>
 			
<script type="text/javascript">

 
 
function _open_audit_workInfo(countractId){
	 
	  $("#countractId").attr('value',countractId);
	 
		var url = "open_projectInfo_audit.jsp";
		$('<div id=open_dlg><iframe frameborder="0" scrolling="no" marginheight="0" framespacing=0 marginwidth="0" '+
				'"FrameBorder=0 src="'+url+'" style="width:100%;height:100%; "/></div>').dialog({			
					open : function() {
					},
					height : 410,
					width : 1000,
					title : '审核'
			});
 }
 




function formatAction(value,row,index){
	var s = '<a href="#" onclick="_open_audit_workInfo('+row.id+')">未审核</a> ';
	return s;	
}


//查询
function search_data(){	
	var ct_name =$("#ct_name").attr('value');
	var d_start = $("#dd1").datebox("getText");
	var d_end= $("#dd2").datebox("getText");
	
	var url = "<%=basePath%>contractInfoAction!loadContractStatusData.do?contractInfo.contractName="+ct_name+"&contractInfo.query_startTime="+d_start+"&contractInfo.query_endTime="+d_end;
	var params = {} ;
	jQuery.post(url,params,function(data){
		//alert(data);
		$('#dg').datagrid("loadData",data);
	
	},'json');
}

$(document).ready(function(){
	
	$(function(){
		$('#dd1').datebox({
		    formatter: function(date){ return date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate();},
		    parser: function(date){ return new Date(Date.parse(date.replace(/-/g,"/")));}
		});
		$('#dd2').datebox({
		    formatter: function(date){ return date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate();},
		    parser: function(date){ return new Date(Date.parse(date.replace(/-/g,"/")));}
		});
	})
	
	
})

</script>
</head>
<body>
	
	<input type="hidden" name=countractId id="countractId">
	
		<table width="1100px"  height="20px" style="text-align:center;background:#f3eeaf;border:1px solid #b3dfda">
				<tr>
					<td width="60">日期 :</td>
					<td><input class="easyui-datebox" style="width:100px" id="dd1">至: <input class="easyui-datebox" style="width:100px" id="dd2"></td>
					<td width="60">合同名称: </td>
					<td><input  style="width:150px" id="ct_name" name="ct_name"></td>
					<td><a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-search" onclick="search_data()">查询</a></td>
				</tr>		
		</<table>
	
	<table id="dg" title="合同信息" class="easyui-datagrid"
			style="width: 1100px; height: 400px" url="<%=basePath %>contractInfoAction!loadContractStatusData.do"
			toolbar="#toolbar"  rownumbers="true"
			fitColumns="true" singleSelect="true" >
			<thead>
				<tr>
					<th field="contractNo" width="30" align="center">
						合同编号
					</th>
					<th field="contractName" width="50" align="center">
						合同名称
					</th>
					<th field="aurhorizedPerson" width="30" align="center">
						编制人员
					</th>
					<th field="auditPerson" width="30" align="center">
						审核人员
					</th>
					<th field="auditTime" width="30" align="center">
						审核时间
					</th>
					<th field="customerContactPerson" width="35" align="center">
						客户联系人
					</th>
					<th field="customerContactPhone" width="40" align="center">
						客户联系电话
					</th>
					
					<th field="createTime" width="30" align="center">
						创建时间
					</th>
					<th field="budgetPrice" width="30" align="center">
						预算价格
					</th>
					<th field="contract_remark" width="50" align="center">
						合同说明
					</th>
					<th field="action" width="50" align="center" formatter="formatAction">
						操作
					</th>
				</tr>
			</thead>
		</table>
		
</body>
</html>